x=linspace(0.99,1.01,101);
for i=1:101
   y_1(i)=x(i)^8-8*x(i)^7+28*x(i)^6-56*x(i)^5+70*x(i)^4-56*x(i)^3+28*x(i)^2-8*x(i)+1;
   y_2(i)=(((((((x(i)-8)*x(i)+28)*x(i)-56)*x(i)+70)*x(i)-56)*x(i)+28)*x(i)-8)*x(i)+1;
   y_3(i)=(x(i)-1)^8;
end
fig=figure(1);hold on;
plot(x,y_1);plot(x,y_2);plot(x,y_3);
hold off;
frame=getframe(fig);
img=frame2im(frame);
imwrite(img,'A.png');